package com.rain.entity;

import java.io.Serializable;
import java.util.Date;
import com.fasterxml.jackson.annotation.JsonFormat;
import org.springframework.format.annotation.DateTimeFormat;
import com.rain.enums.DateTimePatternEnum;
import com.rain.utils.DateUtil;

/**
 * @auther: rain
 * @description: 
 * @date: 2025-10-31
 */
public class SysUnit implements Serializable {

	/**
	 * 
	 */
	private Integer id;

	/**
	 * 父级是菜单id 0是一级菜单
	 */
	private Integer parentId;

	/**
	 * 单位名称
	 */
	private String unitName;

	/**
	 * 备注信息
	 */
	private String remarks;

	/**
	 * 排序
	 */
	private Integer sort;

	/**
	 * 创建时间
	 */
	@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
	@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
	private Date createTime;

	/**
	 * 更新时间
	 */
	@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
	@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
	private Date updateTime;

	/**
	 * 删除时间
	 */
	@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
	@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
	private Date deleteTime;

	public void setId(Integer id)  { 
		this.id = id;
	}

	public Integer getId( ) { 
		return this.id;
	}

	public void setParentId(Integer parentId)  { 
		this.parentId = parentId;
	}

	public Integer getParentId( ) { 
		return this.parentId;
	}

	public void setUnitName(String unitName)  { 
		this.unitName = unitName;
	}

	public String getUnitName( ) { 
		return this.unitName;
	}

	public void setRemarks(String remarks)  { 
		this.remarks = remarks;
	}

	public String getRemarks( ) { 
		return this.remarks;
	}

	public void setSort(Integer sort)  { 
		this.sort = sort;
	}

	public Integer getSort( ) { 
		return this.sort;
	}

	public void setCreateTime(Date createTime)  { 
		this.createTime = createTime;
	}

	public Date getCreateTime( ) { 
		return this.createTime;
	}

	public void setUpdateTime(Date updateTime)  { 
		this.updateTime = updateTime;
	}

	public Date getUpdateTime( ) { 
		return this.updateTime;
	}

	public void setDeleteTime(Date deleteTime)  { 
		this.deleteTime = deleteTime;
	}

	public Date getDeleteTime( ) { 
		return this.deleteTime;
	}

	@Override
	public String toString()  {
		return " SysUnit { id: " + id + ", " + "parentId: " + parentId + ", " + "unitName: " + unitName + ", " + "remarks: " + remarks + ", " + "sort: " + sort + ", " + "createTime: " + DateUtil.format(createTime, DateTimePatternEnum.YYYY_MM_DD_HH_MM_SS.getPattern()) + ", " + "updateTime: " + DateUtil.format(updateTime, DateTimePatternEnum.YYYY_MM_DD_HH_MM_SS.getPattern()) + ", " + "deleteTime: " + DateUtil.format(deleteTime, DateTimePatternEnum.YYYY_MM_DD_HH_MM_SS.getPattern()) + " } ";
	}
}